<template>
	<!-- 扫码进来的 -->
	<view class="index" :style="{ '--color': vuex_config.themeColor1 }">
		<view class="box">
			<image src="../static/partner.png" class="box-img" mode="widthFix"></image>
			<view class="btn" @click="apply">申请合伙人</view>
		</view>
		<sww-login></sww-login>
	</view>
</template>

<script>
import { uniModal } from '@/utils/uniPromise';
export default {
	data() {
		return {};
	},
	onLoad() {
		this.$login();
	},
	methods: {
		apply() {
			uniModal({
				content: '确定申请合伙人'
			}).then(res => {
				if (res == 'success') {
					this.$resPost('SetApplyingPartner')
						.then(res1 => {
							this.$toast('申请成功');
							setTimeout(() => {
								this.$linkTo('index');
							}, 1000);
						})
						.catch(err => {});
				}
			});
		}
	}
};
</script>
<style>
page {
	height: 100%;
}
</style>
<style lang="scss" scoped>
.index {
	width: 100%;
	height: 100%;
	padding: 20rpx;
	.box {
		border: 1px solid #f1f1f1;
		border-radius: 30rpx;
		width: 100%;
		height: 100%;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		align-items: center;
		.box-img {
			width: 100%;
			margin-top: 200rpx;
		}
		.btn {
			width: 600rpx;
			height: 100rpx;
			border-radius: 10rpx;
			margin-top: 300rpx;
			background-color: var(--color);
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fff;
		}
	}
}
</style>
